package com.zyl.ag.bean;


public class AgTD {
	
	
	

	 public static AgTD getAgTD(String str){
		 AgTD agTD =new AgTD();
	  try {
		String[] s =str.split(",");
	
		  agTD.setBuy( s[10] ) ;
		  agTD.setBuynum( s[12] )    ;
		  agTD.setChange(s[17].replace("\";", "")) ;
		  agTD.setClose( s[9] )     ;
		  agTD.setHigh( s[7] )      ;
		  agTD.setLow( s[8] )       ;
		  agTD.setOpen( s[6] )      ;
		  agTD.setPositions( s[14] ) ;
		  agTD.setPrice( s[3] )     ;
		  agTD.setSell(s[11])      ;
		  agTD.setSellnum( s[13])    ;
		  agTD.setTime(s[16])   ;
		  
		 
	} catch (Exception e) {
	}
	return agTD;
 }
	 
	
	//high , low , close , and open values 
//	var hq_str_SGE_AGTD="
//		AGTD,白银延期,
//		Ag(T+D),  
//		6920.00, //最新价
//		--,
//		6975.00,//
//		6935.00,//开盘价

//		6959.00,//最高价
//		6788.00,//最低价
//		6953.00,//昨日结算
//		6920.00,//买价
//		6921.00,//卖价
//		605.00,//买量
//		6.00,//,卖量
//		1706674.00,//持仓量
//		11740211200.00,
//		2012-11-29 10:17:08
//		,-0.47%";//涨跌
	private String price;
	private String open;
	private String close;
	private String high;
	private String low;
	private String buy;
	private String sell;
	private String buynum;
	private String sellnum;
	private String positions;
	private String change ;
	private String time ;
 
	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getOpen() {
		return open;
	}

	public void setOpen(String open) {
		this.open = open;
	}

	public String getClose() {
		return close;
	}

	public void setClose(String close) {
		this.close = close;
	}

	public String getHigh() {
		return high;
	}

	public void setHigh(String high) {
		this.high = high;
	}

	public String getLow() {
		return low;
	}

	public void setLow(String low) {
		this.low = low;
	}

	public String getBuy() {
		return buy;
	}

	public void setBuy(String buy) {
		this.buy = buy;
	}

	public String getSell() {
		return sell;
	}

	public void setSell(String sell) {
		this.sell = sell;
	}

	public String getBuynum() {
		return buynum;
	}

	public void setBuynum(String buynum) {
		this.buynum = buynum;
	}

	public String getSellnum() {
		return sellnum;
	}

	public void setSellnum(String sellnum) {
		this.sellnum = sellnum;
	}

	public String getPositions() {
		return positions;
	}

	public void setPositions(String positions) {
		this.positions = positions;
	}

	public String getChange() {
		return change;
	}

	public void setChange(String change) {
		this.change = change;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	@Override
	public String toString() {
		return " 最新价     " + price
				+ "\n 今开        " + open 
				+ "\n 昨收        " + close
				+ "\n 最高        " + high 
				+ "\n 最低        " + low 
				+ "\n 买价        " + buy
				+ "\n 卖价        " + sell 
				+ "\n 买量        " + buynum
				+ "\n 卖量        " + sellnum 
				+ "\n 持仓量     " + positions 
				+ "\n 涨跌        " + change 
				+ "\n" + time  ;
	}

//	 最新价:
//	--,
//	6975.00,//
//	6935.00,//开盘价

//	6959.00,//
//	6788.00,//
//	6953.00,//
//	6920.00,//
//	6921.00,//
//	605.00,//买量
//	6.00,//,卖量
//	1706674.00,//持仓量
//	11740211200.00,
//	2012-11-29 10:17:08
//	,-0.47%";//

	
 
}
